package com.suning.sawp.dto.esb;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("sysHeader")
public class MemberQuerySysHeader implements Serializable{

    /**
     */
    private static final long serialVersionUID = 1L;
    
    @XStreamAlias("transCode")
    private String transCode = "TR03010980";
    
    @XStreamAlias("tranType")
    private String tranType = "1000";

    @XStreamAlias("userName")
    private String userName;
    
    @XStreamAlias("password")
    private String password;
    
    @XStreamAlias("tranDate")
    private String tranDate;
    
    @XStreamAlias("tranTimestamp")
    private String tranTimestamp;
    
    @XStreamAlias("sourceSystemNo")
    private String sourceSystemNo = "139000001640"; 
    
    @XStreamAlias("destSystemNo")
    private String destSystemNo = "139000000080";
    
    @XStreamAlias("createdTime")
    private String createdTime;
    
    @XStreamAlias("updatedTime")
    private String updatedTime;
    
    @XStreamAlias("sourceByEmployee")
    private String sourceByEmployee;
    
    @XStreamAlias("sourceChannel")
    private String sourceChannel;

    public MemberQuerySysHeader() {
        init();
    }
    
    public MemberQuerySysHeader(String transCode) {
        this.transCode = transCode;
        init();
    }
    
    public String getTransCode() {
        return transCode;
    }

    public void setTransCode(String transCode) {
        this.transCode = transCode;
    }

    public String getTranType() {
        return tranType;
    }

    public void setTranType(String tranType) {
        this.tranType = tranType;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getTranDate() {
        return tranDate;
    }

    public void setTranDate(String tranDate) {
        this.tranDate = tranDate;
    }

    public String getTranTimestamp() {
        return tranTimestamp;
    }

    public void setTranTimestamp(String tranTimestamp) {
        this.tranTimestamp = tranTimestamp;
    }

    public String getSourceSystemNo() {
        return sourceSystemNo;
    }

    public void setSourceSystemNo(String sourceSystemNo) {
        this.sourceSystemNo = sourceSystemNo;
    }

    public String getDestSystemNo() {
        return destSystemNo;
    }

    public void setDestSystemNo(String destSystemNo) {
        this.destSystemNo = destSystemNo;
    }

    public String getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(String createdTime) {
        this.createdTime = createdTime;
    }

    public String getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(String updatedTime) {
        this.updatedTime = updatedTime;
    }

    public String getSourceByEmployee() {
        return sourceByEmployee;
    }

    public void setSourceByEmployee(String sourceByEmployee) {
        this.sourceByEmployee = sourceByEmployee;
    }

    public String getSourceChannel() {
        return sourceChannel;
    }

    public void setSourceChannel(String sourceChannel) {
        this.sourceChannel = sourceChannel;
    }
    
    /**
     * 时间格式化
     *
     * @see [相关类/方法](可选)
     * @since [产品/模块版本](可选)
     */
    private void init() {
        SimpleDateFormat sd1 = new SimpleDateFormat("yyyy-MM-dd");
        SimpleDateFormat sd2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = new Date();
        tranDate = sd1.format(date);
        tranTimestamp = sd2.format(date);
        createdTime = sd2.format(date);
        updatedTime = sd2.format(date);
    }
}
